<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>flex简单使用</title>
		
		<style>
			.box{
				width: 480px;
				height: 400px;
				border: 1px red solid;
				
				/* 设置弹性盒子 */
				display: flex;
				/* 自动换行 */
				flex-wrap: wrap;
				/* 设置排列方式 */
				flex-direction: row;
				/* 主轴对齐方式  */
				justify-content: space-between;
				/* 侧轴对齐方式 */
				align-items: center;
			}
			
			.itme{
				width: 100px;
				/* height: 100px; */
				background-color: aqua;
				/* margin: 5px; */
			}
			/* 给每个子元素设置样式 */
			.box  .itme:nth-child(1){
				height: 50px;
			}
			.box  .itme:nth-child(2){
				height: 150px;
			}
			.box  .itme:nth-child(3){
				height: 200px;
			}
			.box  .itme:nth-child(4){
				height: 80px;
			}
			.box  .itme:nth-child(5){
				height: 120px;
			}
		</style>
	</head>
	<body>
		<div class="box">
			<div class="itme">1</div>
			<div class="itme">2</div>
			<div class="itme">3</div>
			<div class="itme">4</div>
			<div class="itme">5</div>
		</div>
	</body>
</html>